#!/bin/sh

if [ "X$JAVA_HOME" = "X" ] ; then
 echo "ERROR: JAVA_HOME not found in your environment."
 echo "Please, set the JAVA_HOME variable in your environment to match the"
 echo "location of the Java Virtual Machine you want to use."
 exit -1
fi

DIST_DIR=.
TARGET_DIR=${DIST_DIR}/target

SCALA_HOME=.
SCALA_VERSION=2.9.1
BOOT_CP=${SCALA_HOME}/lib/scala-library-${SCALA_VERSION}.jar
CLASSPATH=${TARGET_DIR}/jiva.jar

CLASSPATH=${CLASSPATH}:${SCALA_HOME}/lib/scala-compiler-${SCALA_VERSION}.jar

"${JAVA_HOME}/bin/java" -Xbootclasspath/a:${BOOT_CP} -server -Xmx256m -cp ${CLASSPATH} net.kogics.jiva.JivaMain $*
